<%@page import="liteng.study.cn.stuscore.entity.Student"%>
<jsp:useBean id="tudent" class='liteng.study.cn.stuscore.entity.Student'
	scope="application" />
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<%-- --%>
	<%
	int id = Integer.parseInt(request.getParameter("id"));

	String name = request.getParameter("name");
	%>
	<jsp:setProperty name="tudent" property="id" value="<%=id%>" />
	<jsp:setProperty name="tudent" property="name" value="<%=name%>" />
	<%
	ServletContext context = getServletContext();
	Student stu = (Student) context.getAttribute("tudent");
	long userid = stu.getId();
	String username = stu.getName();
	%>

	<p>
		获取到的数据为：id=<jsp:getProperty property="id" name="tudent" />

		name=<jsp:getProperty property="name" name="tudent" />
	</p>
	
	<p><%=stu%></p>
	
	<p>
		当前访问人数：<%out.print(stu.addCount()); %>
	</p>
	





</body>
</html>